package com.itheima.rpc.server.boot;

import com.itheima.rpc.server.registry.RpcRegister;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class RpcServerRun {

    @Resource
    private RpcRegister register;

    @Resource
    private RpcServer server;

    public void run() {
        //服务注册
        register.serverRegister();

        //服务启动
        server.start();
    }
}
